package com.hengyuan.gulimall.coupon;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * nacos-config
 * 1、引入依赖，
 *         <dependency>
 *             <groupId>com.alibaba.cloud</groupId>
 *             <artifactId>spring-cloud-alibaba-nacos-config</artifactId>
 *         </dependency>
 * 2、增加bootstrap.properties配置文件
 *      并且配置： spring.application.name=gulimall-coupon
 *                spring.cloud.nacos.config.server-addr=192.168.0.11:8848
 * 3、nacos配置中心新增数据集 dataId: gulimall-coupon.properties。默认规则：应用名.properties
 *     Loading nacos data, dataId: 'gulimall-coupon.properties', group: 'DEFAULT_GROUP'
 * 4、给 gulimall-coupon.properties 添加配置
 * 5、动态获取配置 增加 @RefreshScope 注解
 *      @RefreshScope 注解
 *      @value("${配置名}") 获取配置
 */
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallCouponApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallCouponApplication.class, args);
    }

}
